package cn.lf.controller;

import cn.lf.dto.carouseimg.IndexCiRepDTO;
import cn.lf.service.ApiCarouselImgService;
import cn.lf.utils.ResponseModel;
import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/carousel-img")
@Api(tags = "轮播图相关接口")
public class ApiCarouselImgController {

    @Autowired
    private ApiCarouselImgService carouselImgService;

    @GetMapping("getIndexCarouselImgList")
    @ApiOperation("查询首页轮播图")
    public ResponseModel<List<IndexCiRepDTO>> getIndexCarouselImgList(){

        List<IndexCiRepDTO> result = carouselImgService.getIndexCarouselImgList();

        return ResponseModel.buildSuccessResult(result);
    }

}
